#include <stdio.h>
#include <stdlib.h>

int main()
{
    int a,b,t,x,y;
    scanf("%d/%d",&a,&b);
    x=a;
    y=b;
    if(x>y)
    {
        while(y!=0)
      {
          t=x%y;
          x=y;
          y=t;
       }
       printf("%d/%d",a/x,b/x);
    }
    if(x<y)
    {
        while(x!=0)
        {
            t=y%x;
            y=x;
            x=t;
        }
        printf("%d/%d",a/y,b/y);
    }
    return 0;
}
